from django.contrib import admin
from django.urls import path, re_path

from Project.settings import DEBUG, MEDIA_ROOT
from user import views

urlpatterns = [
    path('login/', views.Login.as_view()),
    path('register/', views.Register.as_view()),
    path('personal/', views.Personal.as_view()),
    path('logout/', views.Logout.as_view())
]
if DEBUG:
    from django.views.static import serve

    urlpatterns.append(re_path(r'^media/(.*)$', serve, kwargs={'document_root': MEDIA_ROOT}))
